from collections import defaultdict

from common.mssql_helper import g_msql_inst

__author__ = "Ypf"
_date_ = "2019/7/29-16:56"
class Jdsktj(object):
    @staticmethod
    def get_dic_gys(sql):
        # 获取相应的对比sql查询语句
        res_list1 = g_msql_inst.fetch_all(sql)
        dic = defaultdict(dict)
        for (ghdw,xshth,ckrq,pp,cpmc,ggxh,sfsl,xsdj,xsje,bm,ywy,slv) in res_list1:
            if ghdw=='':
                pass
            else:
                dic[ghdw]=[ghdw,xshth,ckrq,pp,cpmc,ggxh,sfsl,xsdj,xsje,bm,ywy,slv]
        return  dic